package cn.com.cifi.mars.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.cifi.mars.mapper.mars.ReportMapper;
import cn.com.cifi.mars.service.ReportService;
@Service
public class ReportServiceImpl implements ReportService {

	@Autowired
	private ReportMapper reportMapper;

	@Override
	public void initDmDmContractDay() {
		//1、清空目标表数据
		int count = reportMapper.deleteDmDmContractDay();
		if(count == 0) {
			//2、保存数据
			reportMapper.insertDmDmContractDay();
		}
	}
	
	@Override
	public void initDmDmContractMonth() {
		//1、清空目标表数据
		int count = reportMapper.deleteDmDmContractMonth();
		if(count == 0 ) {
			//2、保存数据
			reportMapper.insertDmDmContractMonth();
		}
	}

	@Override
	public void initDmDmPlanSupplyMonth() {
		//1、清空目标表数据
		int count = reportMapper.deleteDmDmPlanSupplyMonth();
		if(count == 0) {
			//2、保存数据
			reportMapper.insertDmDmPlanSupplyMonth();
		}
	}
}
